From e42d946cd98f914a0e9c31fe6cb677305a9f2d30 Mon Sep 17 00:00:00 2001 From: Justin Burkett Date: Mon, 21 Jun 2021 14:55:05 -0400 Subject: [PATCH] Fix prefix sorting --- which-key-tests.el | 2 +- which-key.el | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/which-key-tests.el b/which-key-tests.el index 04617377999..705099b0603 100644 --- a/which-key-tests.el +++ b/which-key-tests.el @@ -189,7 +189,7 @@ ("A" . "Z") ("b" . "y") ("B" . "Y") - ("p" . "Prefix") + ("p" . "prefix") ("SPC" . "x") ("C-a" . "w")))) (let ((which-key-sort-uppercase-first t)) diff --git a/which-key.el b/which-key.el index ec3f760159b..55e65b884f3 100644 --- a/which-key.el +++ b/which-key.el @@ -1401,7 +1401,8 @@ Uses `string-lessp' after applying lowercase." (string-lessp (downcase (cdr acons)) (downcase (cdr bcons)))) (defsubst which-key--group-p (description) - (keymapp (intern description))) + (or (equal description "prefix") + (keymapp (intern description)))) (defun which-key-prefix-then-key-order (acons bcons) "Order first by whether A and/or B is a prefix with no prefix -- 2.30.2